﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="order_list.aspx.cs" Inherits="ByteSite.Web.admin.order.order_list" ValidateRequest="false" %>
<%@ Import namespace="ByteSite.Common" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>订单管理</title>
<link rel="stylesheet" type="text/css" href="../../scripts/artdialog/ui-dialog.css" />


<link rel="stylesheet" type="text/css" href="../skin/default/style.css" />
<link href="../skin/uikit/css/uikit.min.css" rel="stylesheet" />
<script type="text/javascript" src="../skin/uikit/js/uikit.min.js"></script>
<script type="text/javascript" src="../skin/uikit/js/uikit-icons.min.js"></script>
<script type="text/javascript" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="../../scripts/xm-select/xm-select.js"></script>
<script type="text/javascript" src="../../scripts/artdialog/dialog-plus-min.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/laymain.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
</head>

<body class="mainbody">
<form id="form1" runat="server">

<!--工具栏-->
<div class="uk-grid-match uk-child-width-auto uk-flex-between uk-grid">
    <div class="uk-first-column">
        <div class="uk-panel">
            <div class="uk-button-group uk-first-column">
                <a class="uk-button uk-button-default" uk-icon="check" href="javascript:;" onclick="checkAll(this);" uk-tooltip="全选"></a>
                <asp:LinkButton ID="btnDelete" runat="server" uk-icon="trash" CssClass="uk-button uk-button-default" OnClientClick="return ExePostBack('btnDelete','只允许删除已作废订单，是否继续?');" onclick="btnDelete_Click" uk-tooltip="删除"></asp:LinkButton>
                <div class="">                    
                    <button type="button" class="uk-button uk-button-default" uk-icon="list" uk-tooltip="选择更多筛选条件"></button>
                    <div class="uk-width-xxlarge" uk-dropdown="mode:click">
                        <div class="uk-dropdown-grid" uk-grid>
                            <div class="uk-first-column uk-width-1-1">
                                <asp:DropDownList ID="ddlSiteId" runat="server" CssClass="uk-select" AutoPostBack="True" onselectedindexchanged="ddlSiteId_SelectedIndexChanged"></asp:DropDownList>
                            </div>
                            <div class="uk-width-1-1">
                                <asp:DropDownList ID="ddlStatus" runat="server" CssClass="uk-select" AutoPostBack="True" onselectedindexchanged="ddlStatus_SelectedIndexChanged">
                                  <asp:ListItem Value="" Selected="True">订单状态</asp:ListItem>
                                  <asp:ListItem Value="1">已生成</asp:ListItem>
                                  <asp:ListItem Value="2">已确认</asp:ListItem>
                                  <asp:ListItem Value="3">已完成</asp:ListItem>
                                  <asp:ListItem Value="4">已取消</asp:ListItem>
                                  <asp:ListItem Value="5">已作废</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="uk-width-1-1">
                                <asp:DropDownList ID="ddlPaymentStatus" runat="server" CssClass="uk-select" AutoPostBack="True" onselectedindexchanged="ddlPaymentStatus_SelectedIndexChanged">
                                  <asp:ListItem Value="0" Selected="True">支付状态</asp:ListItem>
                                  <asp:ListItem Value="1">待支付</asp:ListItem>
                                  <asp:ListItem Value="2">已支付</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                            <div class="uk-width-1-1">
                                <asp:DropDownList ID="ddlExpressStatus" runat="server" CssClass="uk-select" AutoPostBack="True" onselectedindexchanged="ddlExpressStatus_SelectedIndexChanged">
                                  <asp:ListItem Value="0" Selected="True">发货状态</asp:ListItem>
                                  <asp:ListItem Value="1">待发货</asp:ListItem>
                                  <asp:ListItem Value="2">已发货</asp:ListItem>
                                </asp:DropDownList>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div>
        <div class="uk-panel">
            <div class="uk-margin" uk-margin>
                <asp:TextBox ID="txtKeywords" runat="server" CssClass="uk-input uk-form-width-medium" />
                <asp:LinkButton ID="lbtnSearch" runat="server" CssClass="uk-button uk-button-default" onclick="btnSearch_Click" uk-icon="search"></asp:LinkButton>
            </div>
        </div>
    </div>
</div>
<!--/工具栏-->

<!--列表-->
<div class="table-container">
<asp:Repeater ID="rptList" runat="server">
<HeaderTemplate>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="uk-table uk-table-striped uk-table-justify uk-table-middle uk-table-hover uk-table-divider">
  <thead><tr>
    <th width="8%">选择</th>
    <th class="uk-text-left">订单号</th>
    <th width="12%">会员账号</th>
    <th width="10%">支付方式</th>
    <th width="10%">配送方式</th>
    <th width="8%">订单状态</th>
    <th width="10%">总金额</th>
    <th width="16%">下单时间</th>
    <th width="8%">操作</th>
  </tr></thead>
</HeaderTemplate>
<ItemTemplate>
  <tr>
    <td align="center">
      <asp:CheckBox ID="chkId" CssClass="checkall" runat="server" Enabled='<%#bool.Parse((Convert.ToInt32(Eval("status")) > 3 ).ToString())%>' style="vertical-align:middle;" />
      <asp:HiddenField ID="hidId" Value='<%#Eval("id")%>' runat="server" />
    </td>
    <td class="uk-text-left"><a href="order_edit.aspx?action=<%#DTEnums.ActionEnum.Edit %>&id=<%#Eval("id")%>"><%#Eval("order_no")%></a></td>
    <td><%#Eval("user_name").ToString() == "" ? "匿名用户" : Eval("user_name").ToString()%></td>
    <td><%#new ByteSite.BLL.site_payment().GetTitle(Convert.ToInt32(Eval("payment_id")))%></td>
    <td><%#new ByteSite.BLL.express().GetTitle(Convert.ToInt32(Eval("express_id")))%></td>
    <td align="center"><%#GetOrderStatus(Convert.ToInt32(Eval("id")))%></td>
    <td align="center"><%#Eval("order_amount")%></td>
    <td><%#string.Format("{0:g}",Eval("add_time"))%></td>
    <td align="center"><a href="order_edit.aspx?action=<%#DTEnums.ActionEnum.Edit %>&id=<%#Eval("id")%>">详细</a></td>
  </tr>
</ItemTemplate>
<FooterTemplate>
  <%#rptList.Items.Count == 0 ? "<tr><td align=\"center\" colspan=\"9\">暂无记录</td></tr>" : ""%>
</table>
</FooterTemplate>
</asp:Repeater>
</div>
<!--/列表-->

<!--内容底部-->
<div class="line20"></div>
<div class="uk-grid-small uk-grid-match uk-child-width-expand uk-grid" uk-grid>
    <div class="uk-width-small uk-first-column">
        <div class="uk-panel">
            <div class="l-btns">
                <asp:TextBox ID="txtPageNum" runat="server" CssClass="uk-input uk-form-width-xsmall" onkeydown="return checkNumber(event);"
                 OnTextChanged="txtPageNum_TextChanged" AutoPostBack="True"></asp:TextBox><span> 条/页</span>
              </div>
        </div>
    </div>
    <div>
        <div class="uk-panel">
            <ul id="PageContent" runat="server" class="uk-pagination"></ul>
        </div>
    </div>
</div>
<!--/内容底部-->

</form>
</body>
</html>